public class Test {
    public static void main(String[] args) {
        String name="wangqi,I am wangqi  wangqi";
        String name1=name.replace("wangqi","zhangsan");
        System.out.println(name1);
        System.out.println(name.replaceAll("wangqi","lisi"));
        System.out.println(name.replaceFirst("wangqi","wangqu"));
        System.out.println(name.replace("wangqi", "haha"));
    }
}
